package com.neu.cpsp.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo;
import com.neu.cpsp.pojo.Employee;
import com.neu.cpsp.pojo.EmployeeEntity;
import com.neu.cpsp.pojo.TeamGroup;
import com.neu.cpsp.pojo.TeamGroupInfo;

import java.util.List;

/**
 * @author neu.xiaojiacheng
 * @version 1.0
 * @date 2022/2/23 18:28
 */

public interface EmployeeService {
    boolean submitAllInfo(Employee employee);

    int updateByPrimaryKeySelective(Employee employee);

    List<EmployeeEntity> selectAll();

    List<EmployeeEntity> selectInfoSelective(String department,String teamGroup, Integer isDirectProducer, String name);

    Boolean getIsDirectProducer(String idCard);

    EmployeeEntity selectByCard(String idCard);

    EmployeeEntity selectByJobNumber(String jobNumber);

    List<EmployeeEntity> selectEmployeesByTeamGroup(String teamGroup, String department);

    List<EmployeeEntity> selectEmployeesByDepartment(String department);

    List<String> selectCardByDepart(String department);

    EmployeeEntity getById(Integer id);

    List<EmployeeEntity> selectByName(String name);

    // 条件查询职工信息
    PageInfo<EmployeeEntity> findEmployee(Integer pageNum, Integer pageSize, String departmentId, String teamGroupId, String name);

    // 修改职工班组和岗位类型
    Integer updateEmployeeTeamAndPosition(Integer employeeId, String teamGroupName, String positionType);

    //修改职工是否在岗45天
    Integer updateEmployeeIs45Days(Integer employeeId, Boolean is45Days);

    //查询班组信息及分主管的姓名
    List<TeamGroupInfo> findTeamGroupAndName(String departmentId);

    //修改班组的主管id，分管id
    Integer updateTeamGroupManagerId(Integer id, String branchManagerId, String mainManagerId);

    //添加班组信息
    Integer addTeamGroup(TeamGroup teamGroup);

    // 根据班组id获得一行数据
    TeamGroup selectById(Integer id);

}
